package us.versus.them.b3ge.phyxside;

import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.text.TextField;

import phx.Vector;

/**
 *
 * This is the start screen. It is just like any
 * other Wordly except it restricts interaction
 * and activates the App when the mouse is pressed.
 *
 */
class Welcome extends Worldly {

	public static var FLIP = 'welcome';
	var text : TextField;

	public function new( flipper:Flipper ) {
		super( flipper );
		text = new TextField();
		text.x = 400;
		text.y = 100;
		text.text = '// click to start //';
		this.addChild( text );
	}

	public override function postCreateWorld() {
		new Board( this, "./data/svg/welcome.svg" );
	}

	public override function listenMore() {
		this.addEventListener( MouseEvent.MOUSE_DOWN, mouseDown );
	}

	public function mouseDown( _ ) {
		flip( App.FLIP );
	}
}
